package org.example.mq.mqclient;

import lombok.Getter;
import lombok.Setter;
import org.springframework.context.annotation.Scope;

import java.io.IOException;

@Getter
@Setter
public class ConnectionFactory {
    private String host;
    private int port;
    private String virtualHost = "default";

    //TODO  后续应该对连接校验进行扩写
    //private String username;
    //private String password;

    public Connection newConnection() throws IOException {
        Connection connection = new Connection(host,port,virtualHost);
        return connection;
    }
}
